/*
 * CheckMeetingexistsService.java
 *
 * Created on 21 March 2006, 22:04
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package ajax.services;

import java.io.PrintWriter;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import web.ApplicationController;
import web.services.Service;
import web.util.BusinessFacadeDelegate;

/**
 *
 * @author Phil
 */
public class CheckMeetingexistsService extends CheckService {

     public CheckMeetingexistsService() {
    }
    
    public String executePreDispatch(HttpServletRequest request,
            ServletContext context) throws Exception{
        return "ajax";
        
    }
    
    public void executeDispatch(HttpServletRequest request,
            ServletContext context,
            PrintWriter out){
        String meetingId = request.getParameter(Service.MEETING_ID);
        BusinessFacadeDelegate delegate = ((BusinessFacadeDelegate)request.getSession().getAttribute(ApplicationController.BUSINESS_DELEGATE_REF));
        String response = delegate.checkMeetingExists(meetingId);
        out.print(response);
    }
    
    public void executePostDispatch(HttpServletRequest request,
            ServletContext context)throws Exception{
        
    }
    
}